package umbook.domain;

import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.validation.constraints.NotNull;
import org.springframework.roo.addon.javabean.RooJavaBean;
import org.springframework.roo.addon.jpa.activerecord.RooJpaActiveRecord;
import org.springframework.roo.addon.tostring.RooToString;

@RooJavaBean
@RooToString
@RooJpaActiveRecord(finders = { "findMuroesByIdUsuario" })
public class Muro {

    @NotNull
    @ManyToOne
    private Usuario idUsuario;

    @OneToMany(cascade = CascadeType.ALL, mappedBy = "comentario")
    private Set<Comentarios> comentarioMuro = new HashSet<Comentarios>();
}
